import axios from "axios";
var instance = axios.create({
    baseURL: "http://api-toutiao-web.itheima.net/app/",
});
axios.interceptors.request.use(
    (config) => {
        config.headers.Authorization = this.$store.state.tokenInfo.token;
        return config;
    },
    (error) => {
        return Promise.reject(error);
    }
);
axios.interceptors.response.use(
    (response) => {
        return response;
    },
    (error) => {
        return Promise.reject(error);
    }
);
export default instance;